<template>
  <el-dialog title="系统提示" :visible.sync="dialogVisible" @close="closeEvent">
    <div class="contentBox">
      {{content}}
    </div>
    <div slot="footer" class="dialog-footer">
      <!-- <el-button @click="dialogFormVisible = false">取 消</el-button> -->
      <el-button type="primary" @click="closeEvent">已知晓</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: 'TipDialog',
  props: {
    dialogTipVisible: {
      type: Boolean,
      default: false
    },
    content: {
      type: String,
      default: '暂无内容'
    }
  },
  computed: {
    dialogVisible: {
      get() {
        return this.dialogTipVisible
      },
      set(val) {
        this.$emit('update:dialogTipVisible', val)
      }
    }
  },
  created() {
    console.log('dialogTipVisible组件created==>')
  },
  methods: {
    closeEvent() {
      this.$emit('closeTipEvent')
    }
  }
}
</script>

<style>
.contentBox{
  font-size: 15px;
  line-height: 1.4em;
  max-height: 300px;
  overflow-y: scroll;
}
</style>
